home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 October / Macformat17.cdr / Shareware City / Developers / GAL ƒ / GAL examples / Built in subroutines / software handshake IO < prev   
Encoding:
Text File  |  1994-07-11  |  527 b   |  21 lines  |  [TEXT/ttxt]

  1. ; use these functions/procedures for initial experiments with software controlled I/O
  2. ; each function accepts its argument or returns the result in Register 0
  3. ;the locations instatus, indata, outstatus and outdate are assigned by the assembler as
  4. ; locations 0 through 4
  5.  
  6. input
  7.     copy:byte    instatus,Reg0
  8.     jump:equal input
  9.     copy:byte     indata=>reg0
  10.     return
  11.  
  12. output
  13.     copy:long    reg0,savedata
  14.     copy:byte     outstatus=>reg0
  15.     jump:not_equal output
  16.     copy:long    savedata,Reg0
  17.     copy:byte     reg0,outdata
  18.     return
  19. savedata    variable:long    1
  20.     end
  21.